package com.easybenefit.UUService.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.TextView;

import com.easybeanfit.UUService.config.UUConfig;
import com.easybenefit.UUService.BaseActivity;
import com.easybenefit.UUService.MyApplication;
import com.easybenefit.UUService.R;
import com.easybenefit.UUService.myinterface.IActivityInterface;

public class UserAgreementActivity extends BaseActivity implements IActivityInterface, View.OnClickListener {
    private Button btn_back;//返回
    private TextView tv_title;//标题
    private WebView webView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_agreement);
        initView();
        initData();
        initListener();
    }

    @Override
    public void initData() {
        tv_title.setText("用户协议");
        String url = UUConfig.SERVER_BASE_URL + "pact";
        webView.loadUrl(url);
    }

    @Override
    public void initView() {
        btn_back = (Button) findViewById(R.id.finish_btn);
        tv_title = (TextView) findViewById(R.id.top_title);
        webView = (WebView) findViewById(R.id.webView);
    }

    @Override
    public void initListener() {
        btn_back.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.finish_btn:
                finish();
                break;
        }
    }
}
